package cn.sinata.wanglin.mine.fragment;
import android.view.View;

import com.easemob.redpacketui.utils.RedPacketUtil;
import com.xilada.xldutils.fragment.BaseLazyFragment;
import com.xilada.xldutils.utils.ActivityUtil;
import butterknife.OnClick;
import cn.sinata.wanglin.R;
import cn.sinata.wanglin.mine.activity.GradeActivity;
import cn.sinata.wanglin.mine.activity.MyAreaActivity;
import cn.sinata.wanglin.mine.activity.MyleadmaterialActivity;
import cn.sinata.wanglin.mine.activity.MyrepairActivity;
import cn.sinata.wanglin.mine.activity.VillageActiveActivity;
import cn.sinata.wanglin.net.API;

/**
 * description：我的---小区生活
 * Created by kaihongwu on 2016/12/06 上午 9:45
 */
public class XiaoquLifeFragment extends BaseLazyFragment {
    @Override
    protected int getContentViewLayoutID() {
        return R.layout.fragment_xiaoqulife;
    }

    @Override
    protected void onFirstVisibleToUser() {

    }

    @Override
    protected void onVisibleToUser() {

    }

    @Override
    protected void onInvisibleToUser() {

    }
    @OnClick({R.id.ttlv_myarea,R.id.ttlv_repair,
            R.id.ttlv_leadmaterial,R.id.ttlv_wallet,
            R.id.ttlv_areaactive, R.id.ttlv_grade})

    void onClick(View v) {
        switch (v.getId()) {
            case R.id.ttlv_myarea:
                //描述:我的小区
                ActivityUtil.create(getActivity()).go(MyAreaActivity.class)
                        .start();
                break;
            case R.id.ttlv_repair:
                //描述:我的报修
                ActivityUtil.create(getActivity()).go(MyrepairActivity.class)
                        .start();
                break;
            case R.id.ttlv_leadmaterial:
                //描述:我的领物
                ActivityUtil.create(getActivity()).go(MyleadmaterialActivity.class)
                        .start();
                break;
            case   R.id.ttlv_wallet:
//                //描述:我的钱包
//                ActivityUtil.create(getActivity()).go(MywalletActivity.class)
//                        .start();
                RedPacketUtil.startChangeActivity(getContext());
                break;
            case   R.id.ttlv_areaactive:
                //描述:小区活动
                ActivityUtil.create(getActivity()).go(VillageActiveActivity.class)
                        .start();
                break;
            case    R.id.ttlv_grade:
                //描述:开心网邻等级
                ActivityUtil.create(getActivity()).go(GradeActivity.class)
                        .put("url", API.URL_GRADE)
                        .start();
                break;
        }
    }
}
